<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>大类列表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <!--[if lt IE 8]>
    <script>
        alert('H+已不支持IE6-8，请使用谷歌、火狐等浏览器\n或360、QQ等国产浏览器的极速模式浏览本页面！');
    </script>
    <![endif]-->
    <link href="/static/admin/public/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="/static/admin/public/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
    <link href="/static/admin/public/css/animate.min.css" rel="stylesheet">
    <link href="/static/toastr/toastr.min.css" rel="stylesheet"></link>
    <link href="/static/admin/public/css/style.min.css?v=3.2.0" rel="stylesheet">
    <link href="/static/admin/plugins/jsTree/css/style.min.css" rel="stylesheet">
</head>

<body class="fixed-sidebar full-height-layout gray-bg">
<div class="wrapper wrapper-content animated fadeInRight" id="contentList">
    <div class="ibox float-e-margins" >

        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5 class="pull-left">大类列表</h5>
                <div class="pull-right">
                    <a href="add" class="btn btn-link">添加大类</a>
                </div>

            </div>
            <div class="ibox-content">
                <table class="table">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>分类标题</th>
                        <th>添加时间</th>
                        <th>更新时间</th>
<!--                        <th>排序</th>-->
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(item,index) in list">
                        <td>{{index}}</td>
                        <td>{{item.name}}</td>
                        <td>{{item.create_time}}</td>
                        <td>{{item.update_time}}</td>
<!--                        <td>-->
<!--                            <div class="form-group" style="width: 50px">-->
<!--                                <input name="channel_name" v-model="item.sort" @blur='changeSort(item.id,item.sort)' type="text" class="form-control">-->
<!--                            </div>-->
<!--                        </td>-->
                        <td>
                            <div role="group" aria-label="..." class="btn-group">
                                <a v-bind:href="'/admin/trade/edit/id/'+item.id" type="button" class="btn btn-warning btn-xs">编辑</a>
<!--                                <button @click="removeContent(item.id,index)" type="button" class="btn btn-danger btn-xs">删除</button>-->
                            </div>
                        </td>
                    </tr>
                    </tbody>

                </table>
            </div>

        </div>
    </div>
</div>
<!-- 全局js -->
<script src="/static/admin/public/js/jquery-2.1.1.min.js"></script>
<script src="/static/admin/public/js/bootstrap.min.js?v=3.4.0"></script>
<script src="/static/admin/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/static/admin/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/admin/plugins/layer/layer.min.js"></script>
<script type="text/javascript" src="/static/vue/vue.js"></script>
<!-- 自定义js -->
<script type="text/javascript" src="/static/util/axios.min.js"></script>
<script type="text/javascript" src="/static/admin/api/require.js"></script>
<script type="text/javascript" src="/static/admin/api/publicAjax.js"></script>

<!-- 第三方插件 -->
<script src="/static/toastr/toastr.min.js"></script>
<script src="/static/toastr/customToastr.js"></script>
<script src="/static/admin/plugins/jsTree/js/jstree.min.js"></script>
<script>
    var vmAddChannel = new Vue({
        el:"#contentList",
        data:{
            "list":[]
        },
        methods:{
            getList:function () {
                let el = this
                AjaxPostFree('/admin/trade/getTradeList').then((response)=>{
                    console.log(response)
                    el.list = response.result
                })
            },
        },
        mounted(){
            this.getList();
        }

    })
</script>
</body>
</html>
